Fix compile on nightly
authorAlex Crichton <alex@alexcrichton.com>
Sun, 26 Jul 2015 15:58:59 +0000 (08:58 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Sun, 26 Jul 2015 15:58:59 +0000 (08:58 -0700)
The lints for C apis were tweaked recently and 0-size structs aren't liked.
These should be empty `enum`s anyway, however, to ensure they're never created.

src/cargo/util/sha256.rs

index 8066ab74e2d96a3f641ce7d4c0792a7cf5db4647..04e1974210fe64f94ce762c8ddfad5d016bc15f2 100644 (file)
@@ -3,12 +3,13 @@ pub use self::imp::Sha256;
 // Someone upstream will link to OpenSSL, so we don't need to explicitly
 // link to it ourselves. Hence we pick up Sha256 digests from OpenSSL
 #[cfg(not(windows))]
+#[allow(bad_style)]
 mod imp {
     use libc;
 
-    #[repr(C)] struct EVP_MD_CTX;
-    #[repr(C)] struct EVP_MD;
-    #[repr(C)] struct ENGINE;
+    enum EVP_MD_CTX {}
+    enum EVP_MD {}
+    enum ENGINE {}
 
     extern {
         fn EVP_DigestInit_ex(ctx: *mut EVP_MD_CTX,